package com.keyancompany.zhongbaopingtai.adapter;

import android.content.Context;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.keyancompany.zhongbaopingtai.R;
import com.keyancompany.zhongbaopingtai.model.Labels;

/**
 * Created by firefox on 2016/6/16.
 */
public class FenLeiAdapter extends ListAdapter<Labels> {

    public FenLeiAdapter(Context ctx) {
        super(ctx);
    }

    @Override
    public int getContentViewId() {
        return R.layout.item_team;
    }


    @Override
    public HolderView getHoldView(int position, View contentView, ViewGroup parent) {
        TeamHolder hold = new TeamHolder();
        hold.teamName = (TextView) contentView.findViewById(R.id.team_name);
        return hold;
    }

    @Override
    public void setItemView(int position, HolderView contentView, Labels item) {
        TeamHolder hold = (TeamHolder) contentView;
        hold.teamName.setText(item.getText());
    }

    public class TeamHolder extends HolderView {
        TextView teamName;
    }
}
